<extend name="Base/layout" />
<block name="content">
    <include file="Base:breadcrumb" />
    <div class="page-left">
        <div class="blog-tag shadow">
            <fieldset class="layui-elem-field layui-field-title">
                <legend>留言</legend>
                <div class="layui-field-box <if condition="!session('openid')">center</if>">
                    <if condition="!session('openid')">
                    <a class="layui-btn layui-btn-normal" href="{:U('/qq_login')}" style="margin-top:5px;">请登录后留言</a>
                    <else/>
                    <form class="layui-form blog-editor" id="message-form">
                        <div class="layui-form-item">
                            <textarea class="layui-textarea layui-hide" name="content" lay-verify="message_content" id="messageEditor" placeholder="请输入留言内容">
                            </textarea>
                        </div>
                        <div class="layui-form-item">
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="message">提交留言</button>
                        </div>
                    </form>
                    </if>
                </div>
            </fieldset>
            <h2>留言</h2>
            <div>
                <dd class="review" id="message">
                </dd>
                <div class="hf">
                    <form class="layui-form"> 
                        <textarea id="reply_message_from" type="text" class="layui-textarea" name="content" autocomplete="off" maxlength="100" placeholder="请输入留言内容" lay-verify="reply_content" style="height:105px;"></textarea>
                        <if condition="!session('openid')">
                        <a class="layui-btn layui-btn-normal" href="{:U('/qq_login')}" style="margin-top:5px;">请登录后回复</a>
                        <else/>
                        <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="reply_message" style="margin-top:5px;">回复</button>
                        </if>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="page-right topic">
        <div class="blog-tag shadow">
            <h2>博主资料</h2>
            <div class="introduce">
                <img src="__IMG__/logo1.png" alt="Huason" width="100px" height="30px" style="padding: 10px">
            <p class="">90后程序员，PHP开发工程师</p>
            <p class=""><i class="fa fa-location-arrow"></i>&nbsp;福建 - 龙岩</p>
            </div>
        </div>
        <include file="Base:hot_new_list" />
        <include file="Base:link" />
    </div>
</block>
<block name="urls">
    message:"{:U('message/addMessage')}",
    reply_message:"{:U('ReplyMessage/addReplyMessage')}",
    upvote:"{:U('message/upvote')}",
    reply_upvote:"{:U('ReplyMessage/upvote')}",
    page:"{:U('message/page')}"
</block>
<block name="javascript">
<script src="__JS__/reply.js"></script>
<script type="text/javascript">
    $(function(){
        Reply.initialize();
    });
</script>
</block>